package cn.buk.tms.entity.base;


import jakarta.persistence.*;
import java.util.Date;

/**
 * 机场基本信息
 * @author yfdai
 */
@Entity
@Table(name="t001")
public class Airport {

	@Id
	@Column(length = 3)
	private String threeCode;

	@Column(length = 50, name = "cnName")
	private String nameCN;

	@Column(length = 200, name = "enName")
	private String nameEN;

	@Column(length = 1)
	private String airportType;

	@Column(length = 2)
	private String countryCode;

	@Column(length = 3)
	private String cityCode;

	private String cityName;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", insertable = false, updatable = false)
	private Date createTime;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "lastupdate", insertable = false)
	private Date lastUpdate;

	/**
	 * 拼音
	 */
	@Transient
	private String cityNamePinyin;

	/**
	 * 拼音的首字母
	 */
	@Transient
	private String cityNamePy;

	public String getThreeCode() {
		return threeCode;
	}

	public void setThreeCode(String threeCode) {
		this.threeCode = threeCode.toUpperCase().trim();
	}

	public String getNameCN() {
		return nameCN;
	}

	public void setNameCN(String nameCN) {
		this.nameCN = nameCN.trim();
	}

	public String getNameEN() {
		return nameEN;
	}

	public void setNameEN(String nameEN) {
		this.nameEN = nameEN;
	}

	public String getAirportType() {
		return airportType;
	}

	public void setAirportType(String airportType) {
		this.airportType = airportType;
	}

	public String getCountryCode() {
		return countryCode;
	}

	public void setCountryCode(String countryCode) {
		this.countryCode = countryCode.trim().toUpperCase();
	}


	public String getCityCode() {
		return cityCode;
	}

	public void setCityCode(String cityCode) {
		this.cityCode = cityCode;
	}

	public String getCityName() {
		return cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}

	public String getCityNamePy() {
		return cityNamePy;
	}

	public void setCityNamePy(String cityNamePy) {
		this.cityNamePy = cityNamePy;
	}

	public String getCityNamePinyin() {
		return cityNamePinyin;
	}

	public void setCityNamePinyin(String cityNamePinyin) {
		this.cityNamePinyin = cityNamePinyin;
	}

	public Date getLastUpdate() {
		return lastUpdate;
	}

	public void setLastUpdate(Date lastUpdate) {
		this.lastUpdate = lastUpdate;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
}
